﻿using System;

namespace AvaloniaApplicationDemo.Models;

/// <summary>
/// Modbus状态事件参数
/// </summary>
public class ModbusStatusEventsAgrs: EventArgs
{
  
        public bool IsConnected { get; }
        public string? Message { get; }
        public Exception? Exception { get; }
        public ModbusDeviceData? DeviceData { get; }

        public ModbusStatusEventsAgrs(bool isConnected, string? message = null, 
            Exception? exception = null, ModbusDeviceData? deviceData = null)
        {
            IsConnected = isConnected;
            Message = message;
            Exception = exception;
            DeviceData = deviceData;
        }
    
}